include mixin
ul.breadcrumb
	li
		a(href='/portal/index') 首页
	li.sep >
	li
		a(href='/portal/mygf/asset') 我的广发
	li.sep >
	li 我的自选

.myInvestmentContainer
	.categories
		ul
			li.font16.myStock(ng-class='{active : activeType == "stock"}', ng-click='active(0)') 自选股
			li.font16.myFund(ng-class='{active : activeType == "fund"}', ng-click='active(1)') 基金
			li.font16.myAsset(ng-class='{active : activeType == "asset"}', ng-click='active(2)') 理财产品
			li.font16.myService.hidden(ng-class='{active : activeType == "service"}', ng-click='active(3)') 服务产品
		span.font24.nfc(style='cursor:default') 我的自选

	.tableView.mtop20
		.stockTable(ng-show='activeType == "stock"')
			.detail.pull-right.mright20(style='line-height:44px;width:520px;text-align:right;')
				span.mright20 现在时间 ：
					span(ng-bind='currentTime | date: "MM月dd日 HH:mm:ss"')
				span(ng-show='activeItems && activeItems.length')
					span.mright20 沪深交易状态：
						span(ng-show='isOnTrade') 交易中
						span(ng-show='!isOnTrade') 非交易时段
					span 行情更新时间：
						span(ng-bind='updateTime')
					a.refresh(href='javascript:;', ng-click='refresh()', ng-show='isOnTrade') &nbsp;
			.pull-right.successfulTips(ng-bind='successfulTips', ng-show='successfulTips')
			.pull-right.failTips(ng-bind='failTips', ng-show='failTips')
			form.searchForm.nomp(ng-controller='App.SearchStockCtrl')
				.search
					a.add(href='javascript:;', ng-click='add(selectedItem)') .
					div(style='position:relative;width:175px')
						span.inputTips 添加股票：代码/名称
						input.border(style='width:143px', type='search', ng-model='q', name='q',  gf-textsearch='#stockSearchList', focus-cls='lbc b blurborder', autocomplete='off', line-height=22)
					dl#stockSearchList.resultPanel.border(ng-show='products && products.length', style='width:180px')
						dd(ng-repeat='pro in products', ng-init='$parent.selectedItem = products[0]')
							a(href='javascript:;', ng-click='$parent.q = pro[0];$parent.selectedItem = pro')
								span(ng-bind-html-unsafe='pro[0] | highlight : q : "highlight b"')
								| ({{pro[1]}})
			table.mtop20
				thead: tr
					th 代码
					th 名称
					th(style='width: 70px') 最新价
					th 涨跌幅
					th(style='width:40px') 昨收
					th(style='width:40px') 今开
					th(style='width:70px') 最高/最低价
					th(style='width:70px') 成交额(万)
					th(style='width:70px') 市值(亿元)
					th 换手率
					th(style='width:70px') 市盈率
					th(style='width:60px') 是否持仓
					th.hidden 提醒
					th.hidden 备注
					th(style='width:30px') 删除
				tbody
					tr(ng-repeat='item in activeItems', ng-class-even="'even'")
						td(ng-bind='item.code')
						td.name: a.link(ng-bind='item.name', href='#/stock/detail?pid={{item.code}}&type={{item.exchange_abbr}}')
						td.price(ng-class='{up : item.changeRate > 0, down : item.changeRate < 0}'): span(ng-bind='item.price | number : 2')
						td(ng-bind='(item.changeRate | number : 2) + "%"', ng-class='{up : item.changeRate > 0, down : item.changeRate < 0}')
						td(ng-bind='(item.close | number : 2)')
						td(ng-bind='(item.open | number : 2)')
						td(ng-bind='(item.high | number : 2) + "/" + (item.low | number : 2)')
						td(ng-bind='(item.amount | number : 2)')
						td(ng-bind='(item.marketValue | number : 2)')
						td(ng-bind='(item.turnoverRate | number : 2) + "%"')
						td(ng-bind='(item.peRatio | number : 1)')
						td(ng-click='showDetail(item, $event)'): span.myInvestmentIcon.hold(ng-class='{holded : item.hold}') --
						td.hidden(ng-click='remind(item)'): span.myInvestmentIcon.remind(ng-class='{reminded : item.hold}')
						td.hidden(ng-click='remark(item)'): span.myInvestmentIcon.remark(ng-class='{remarked : item.hold}')
						td(ng-click='delete(item)'): span.myInvestmentIcon.delete



	.tableView.mtop20
		.fundTable(ng-show='activeType == "fund"')
			.detail.pull-right.mright20.hidden(style='line-height:44px')
				span.mright10 现在时间 ：8月26日 09:23:17
				span.mright10 沪深交易状态：交易中
				span 行情更新时间：15:02:59
				a.refresh(href='javascript:;', ng-click='refresh()') .
			.pull-right.successfulTips(ng-bind='successfulTips', ng-show='successfulTips')
			.pull-right.failTips(ng-bind='failTips', ng-show='failTips')
			form.searchForm.nomp(ng-controller='App.SearchFormCtrl')
				.search
					a.add(href='javascript:;', ng-click='add(selectedItem)') .
					div(style='position:relative;width:143px')
						span.inputTips 添加基金：代码/名称
						input.border(style='width:143px', type='search', ng-model='q', name='q',  gf-textsearch='#fundSearchList', focus-cls='lbc b blurborder', autocomplete='off', line-height=22)
					dl#fundSearchList.resultPanel.border(ng-show='products.fund && products.fund.length', style='width:180px')
						dd(ng-repeat='pro in products.fund', ng-init='$parent.selectedItem = products.fund[0]')
							a(href='javascript:;', ng-click='$parent.q = pro[0];$parent.selectedItem = pro')
								span(ng-bind-html-unsafe='pro[0] | highlight : q : "highlight b"')
								| ({{pro[2]}})
			table.mtop20
				thead: tr
					th 代码
					th 名称
					th 最新净值
					th(style='width:60px;*width:70px;') 涨跌幅
					th 净值日期
					th(style='width:60px;*width:80px;') 是否持仓
					th.hidden(style='width:50px') 提醒
					th.hidden(style='width:50px') 备注
					th(style='width:50px') 买
					th(style='width:60px;*width:80px;') 删除自选
				tbody
					tr(ng-repeat='item in activeItems', ng-class-even="'even'")
						td(ng-bind='item.code')
						td.name: a.link(ng-bind='item.name', href='#/fund/detail?pid=F_{{item.code}}')
						td.price(ng-class='{up : item.changeRate > 0, down : item.changeRate < 0}'): span(ng-bind='item.price | number : 4')
						td(ng-bind='(item.changeRate | number : 2) + "%"', ng-class='{up : item.changeRate > 0, down : item.changeRate < 0}')
						td(ng-bind='item.date |date: "yyyy-MM-dd" ')
						td(ng-click='showDetail(item, $event)'): span.myInvestmentIcon.hold(ng-class='{holded : item.hold}') --
						td.hidden(ng-click='remind(item)'): span.myInvestmentIcon.remind(ng-class='{reminded : item.hold}')
						td.hidden(ng-click='remark(item)'): span.myInvestmentIcon.remark(ng-class='{remarked : item.hold}')
						td: span.myInvestmentIcon.buy(ng-class='{bought : item.hold}')
							a.link(href='#/fund/detail?pid=F_{{item.code}}') &nbsp;
						td(ng-click='delete(item)'): span.myInvestmentIcon.delete
		.assetTable(ng-show='activeType == "asset"')
			.pull-right.successfulTips(ng-bind='successfulTips', ng-show='successfulTips')
			.pull-right.failTips(ng-bind='failTips', ng-show='failTips')
			form.searchForm.nomp(ng-controller='App.SearchFormCtrl')
				.search
					a.add(href='javascript:;', ng-click='add(selectedItem)') .
					div(style='position:relative;width:143px')
						span.inputTips 添加理财产品：代码/名称
						input.border(style='width:143px', type='search', ng-model='q', name='q', gf-textsearch='#assetSearchList', focus-cls='lbc b blurborder', autocomplete='off', line-height=22)
					dl#assetSearchList.resultPanel.border(ng-show='products.money && products.money.length', style='width:180px')
						dd(ng-repeat='pro in products.money', ng-init='$parent.selectedItem = products.money[0]')
							a(href='javascript:;', ng-click='$parent.q = pro[0];$parent.selectedItem = pro')
								span(ng-bind-html-unsafe='pro[0] | highlight : q : "highlight b"')
								| ({{pro[2]}})
			table.mtop20
				thead: tr
					th(style='width:60px') 代码
					th 名称
					th(style='width:60px;*width:70px;') 风险等级
					th 最新净值
					th(style='width:60px;*width:70px;') 涨跌幅
					th(style='width:60px;*width:80px;') 产品状态
					th(style='width:60px;*width:80px;') 是否持仓
					th.hidden(style='width:50px') 备注
					th(style='width:50px') 买
					th(style='width:60px;*width:70px;') 删除自选
				tbody
					tr(ng-repeat='item in activeItems', ng-class-even="'even'")
						td(ng-bind='item.code')
						td.name: a.link(ng-bind='item.name', href='#/asset/detail?pid={{item.assetId}}')
						td(ng-bind='item.risk')
						td.price(ng-class='{up : item.changeRate > 0, down : item.changeRate < 0}'): span(ng-bind='item.price | number : 4')
						td(ng-bind='item.changeRate && ((item.changeRate | number : 2) + "%")', ng-class='{up : item.changeRate > 0, down : item.changeRate < 0}')
						td(ng-bind='item.state')
						td(ng-click='showDetail(item, $event)'): span.myInvestmentIcon.hold(ng-class='{holded : item.hold}') --
						td.hidden(ng-click='remark(item)'): span.myInvestmentIcon.remark(ng-class='{remarked : item.hold}')
						td: span.myInvestmentIcon.buy(ng-class='{bought : item.hold}')
							a.link(href='#/asset/detail?pid={{item.assetId}}') &nbsp;
						td(ng-click='delete(item)'): span.myInvestmentIcon.delete
		.serviceTable(ng-show='activeType == "service"')
			table
				thead: tr
					th(style='width:50px') 编号
					th(style='width:100px') 名称
					th(style='width:50px') 风险等级
					th(style='width:50px') 单价
					th 简介
				tbody
					tr(ng-repeat='item in activeItems', ng-class-even="'even'")
						td(ng-bind='item[0]')
						td.name(ng-bind='item[1]')
						td(ng-bind='item[2]')
						td
							span(style='color:#ff6000', ng-bind='item[3]')
							| 元/月
						td(ng-bind='item[4]')

	.newsList.mtop30(ng-show='newsList')
		.news
			.title.font14.nfc
				a.readMore.mright20(ng-href='#/news?cat={{category}}&back={{category}}')  更多 >
				| 自选沪深公告
			ul
				li(ng-repeat='news in newsList')
					span.pull-right.afc(ng-bind='(news.pubdate || news.upload_date) | date: "yyyy-MM-dd"')
					a(href='#/news?type=detail&cat={{category}}&id={{news.id || news.doc_id}}&back={{activeType}}&doc_type={{news.doc_type}}', ng-bind='news.title')

	.remindDialog.dialog.border(ng-show='showRemindDlg')
		.close(ng-click='showRemindDlg = false;') .
		.title.font16 提醒
		.pad15
			.tabs.mbottom10
				.tab.mright10(ng-class='{active : remindTab == 0}', ng-click='remindTab = 0')
					.arrowDown
					| 设置提醒
				.tab(ng-class='{active : remindTab == 1}', ng-click='remindTab = 1')
					.arrowDown
					| 历史提醒
			.remindSetting(ng-show='remindTab == 0')
				.infos
					span.name.font18.nfc(ng-bind='remindItem.name')
					span.code.font12（
						span(ng-bind='remindItem.code')
						| ）
					span.font12 当前净值：
					span.font12(style='color:#e86c3c', ng-bind='remindItem.price')
				p 出现以下的情况时，您会收到消息提醒
				.setting
					input(type='checkbox')
					span 开盘后涨跌幅超过
					input(type='text', style='width:50px;margin:0 5px;')
					span (每日一次)
			.history(ng-show='remindTab == 1')
				table: tbody
					tr(ng-repeat='remindHistory in remindHistoryList', ng-class-even="'even'")
						td(ng-bind='remindHistory[0]')
						td(ng-bind='remindHistory[1]')
						td(ng-bind='remindHistory[2]')
						td(ng-bind='remindHistory[3]')
			.mtop10
				a.btn.mright10.confirm(href='javascript:;', ng-click='confirmRemind();showRemindDlg = false;') 确认
				a.btn.cancel(href='javascript:;', ng-click='showRemindDlg = false;') 取消

	.remarkDialog.dialog.border(ng-show='showRemarkDlg')
		.close(ng-click='showRemarkDlg = false;') .
		.title.font16 备注
		.pad15
			.infos
				span.name.font18.nfc(ng-bind='remarkItem.name')
				span.code.font12（
					span(ng-bind='remarkItem.code')
					| ）
				span.font12 当前净值：
				span.font12(style='color:#e86c3c', ng-bind='remarkItem.price')
			.userInput
				p.nfc 请输入备注信息：
				textarea(placeholder='如您购入的理由和目标价位')
			.mtop10
				a.btn.confirm(href='javascript:;', ng-click='confirmRemark();showRemarkDlg = false;') 确认
			.history
				p 备注历史
				table(style='border-top:1px solid #b9d9ec;border-bottom:1px solid #b9d9ec')
					thead: tr
						th 日期
						th 内容
						th(style='width:50px') 删除
					tbody
						tr(ng-repeat='remarkHistory in remarkHistoryList', ng-class-even="'even'")
							td(ng-bind='remarkHistory[0]')
							td(ng-bind='remarkHistory[1]')
							td.myInvestmentIcon.delete

	.investmentDetail.border(ng-show='showDetailDlg')
		a.close(href='javascript:;', ng-click='showDetailDlg=false;') .
		.arrowTop1
		.arrowTop2
		.pad30
			.infos
				span.name.font18.nfc(ng-bind='detailItem.name')
				span.code.font12（
					span(ng-bind='detailItem.code')
					| ）
				span.font12 当前净值：
				span.font12(style='color:#e86c3c', ng-bind='detailItem.price | number : 3')
			table
				thead: tr
					th 投入金额
					th 持有份额
					th 最新市值
					th 当前盈亏
					th 盈亏率
					th(style='width:30px') 买
					th(style='width:30px') 卖
				tbody: tr
					td(ng-bind='detailItem.costTotal | number : 2')
					td(ng-bind='detailItem.currentShare | number : 2')
					td(ng-bind='(detailItem.price * detailItem.currentShare) | number : 2')
					td(ng-bind='detailItem.incomeBalance | number : 2', ng-class='{up : detailItem._ykl > 0, down : detailItem._ykl < 0}')
					td(ng-bind='detailItem.ykl', ng-class='{up : detailItem._ykl > 0, down : detailItem._ykl < 0}')
					td: a.myInvestmentIcon.buy(href='{{detailItem.url}}') &nbsp;
					td: a.myInvestmentIcon.sell(href='{{detailItem.sellUrl}}') &nbsp;

	.deleteDialog.dialog.border(ng-show='showDeleteDlg')
		.close(ng-click='showDeleteDlg = false;') .
		.title.font16 删除自选
		.pad15
			p.font18 您确定要将“
				span(ng-bind='deleteItem.name')
				| ”移出我的自选？

		.mtop10.tac.mbottom20
			a.btn.mright10.confirm(href='javascript:;', ng-click='confirmDelete();showDeleteDlg = false;') 确认
			a.btn.cancel(href='javascript:;', ng-click='showDeleteDlg = false;') 取消






